package com.white.bean;

import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 拉黑：拉黑ID、拉黑用户ID、被拉黑用户ID、拉黑时间。
 * create table block(
 * blockId int primary key AUTO_INCREMENT comment "拉黑ID",
 * userId int comment "拉黑用户ID",
 * foreign key(userId) REFERENCES user(userId) on delete cascade on update cascade,
 * blockUserId int comment "被拉黑用户ID",
 * foreign key(blockUserId) REFERENCES user(userId) on delete cascade on update cascade,
 * createTime TIMESTAMP not null default CURRENT_TIMESTAMP comment "拉黑时间"
 * );
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Block {
    @TableId("blockId")
    private Long blockId;
    private Long userId, blockUserId;
    private String createTime;

    public Block(Long userId, Long blockUserId) {
        this.userId = userId;
        this.blockUserId = blockUserId;
    }
}
